/*2S7LXljdWdGhrCxZ1MFl4i0/jcYg0CI/M/l35xRmsHHDM270ypZGxQFjXbKKRAXA*/
const modalConfig={
    size:'md'//sm/lg/md
}
//纵向radio样式
const radioStyle = {
    display: 'block',
    height: '26px',
    lineHeight: '26px'
    // marginBottom: 12
};
//纵向radio样式
const radioStyle_30 = {
    display: 'block',
    height: '30px',
    lineHeight: '30px'
    // marginBottom: 12
};
//纵向radio样式
const radioStyle_28 = {
    display: 'block',
    height: '28px',
    lineHeight: '28px'
    // marginBottom: 12
};

//表单默认布局样式
const  formItemConfig={
    labelCol:{
        xs: { span: 4 },
        sm: { span: 4 },
        md: { span: 4 }
    },
    wrapperCol:{
        xs: { span: 16 ,},
        sm: { span: 16 ,},
        md: { span: 16,}
    }
}
//凭证高级
const voucherHeightConfig={
    allCol:{
        xs: { span: 24 },
        sm: { span: 24 },
        md: { span: 24 }
    },
    halfCol:{
        xs: { span: 12 },
        sm: { span: 12 },
        md: { span: 12 }
    },
    fourCol:{
        xs: { span: 4 },
        sm: { span: 4 },
        md: { span: 4 }
    },
    fiveCol:{
        xs: { span: 5 },
        sm: { span: 5 },
        md: { span: 5 }
    },
    oneCol:{
        xs: { span: 1 },
        sm: { span: 1 },
        md: { span: 1 }
    },
    twoCol:{
        xs: { span: 2 },
        sm: { span: 2 },
        md: { span: 2 }
    },
    toZeroCol:{
        xs: { span: 18 },
        sm: { span: 18 },
        md: { span: 18 }
    },
    sevenCol:{
        xs: { span: 7 },
        sm: { span: 7 },
        md: { span: 7 }
    },
    eightCol:{
        xs: { span: 8 },
        sm: { span: 8 },
        md: { span: 8 }
    },
    selectLabelCol:{
        xs: { span: 6 },
        sm: { span: 6 },
        md: { span: 6 }
    },
    selectWrapperCol:{
        xs: { span: 18 },
        sm: { span: 18 },
        md: { span: 18 }
    },
    referLabelCol:{
        xs: { span: 6 },
        sm: { span: 6 },
        md: { span: 6 }
    },
    referWrapperCol:{
        xs: { span: 8 },
        sm: { span: 8},
        md: { span: 8}
    },
    twentyCol:{
        xs: { span: 20 },
        sm: { span: 20 },
        md: { span: 20 }
    },
    sixteenCol:{
        xs: { span: 16 },
        sm: { span: 16 },
        md: { span: 16 }
    },
    tenCol:{
        xs: { span: 10 },
        sm: { span: 10 },
        md: { span: 10 }
    },
    elevenCol: {
        xs: { span: 11 },
        sm: { span: 11 },
        md: { span: 11 }
    }
}
function getColConfig(){
    let colLabelConfig={
        lg:{ span: 4 },
        sm:{ span: 4 },
        xs:{ span: 4 },
        md:{ span: 4 },
        className:'lableRight gl-row-line-height'
    }
    let sixConfig={
        lg:{ span: 6 },
        sm:{ span: 6 },
        xs:{ span: 6 },
        md:{ span: 6 },
        className:'lableRight gl-row-line-height'
    }
    let eightConfig={
        lg:{ span: 8 },
        sm:{ span: 8 },
        xs:{ span: 8 },
        md:{ span: 8 },
        className:'lableRight gl-row-line-height'
    }
    let colInputConfig={
        lg:{ span: 12},
        sm:{ span: 12},
        xs:{ span: 12},
        md:{ span: 12},
        className:' gl-row-line-height'
    }
    let halfConfig={
        lg:{ span: 10 },
        sm:{ span: 10 },
        xs:{ span: 10 },
        md:{ span: 10 }
    }
    let otherConfig={
        lg:{ span: 16},
        sm:{ span: 16},
        xs:{ span: 16},
        md:{ span: 16},
        className:' gl-row-line-height'
    }
    let twentyColConfig={
        lg:{ span: 20},
        sm:{ span: 20},
        xs:{ span: 20},
        md:{ span: 20},
        className:' gl-row-line-height'
    }
    return {colLabelConfig,sixConfig, eightConfig,colInputConfig,otherConfig,halfConfig, twentyColConfig};
}
function betweenIconRender(ColComponent){
    return(
        <ColComponent
            md={4} lg={4} sm={4} xs={4} 
            className="gl-modal-between"
        >
        ~
        </ColComponent>
    )
}
//表单样式
function getFormItemConfig(param){
    let{item}=param;
    let config={
        className:'gl-formItemHeight',
        label: item && (item.itemName || item.labelName) ||'',
        rules:[
            {
              required: item && (item.isMustItem || item.showMast) ||''
            }
        ]
    }
    return Object.assign(config,formItemConfig);
}
//弹框的样式
function getModalConfig(){
    return modalConfig;
}
//表格
function getNCTableConfig(){

}

//获取自定义Row Col配置 一行份两份 默认1:3
function getCustomRowColConfig(params={}) {
    let {labelCol=6, labelRight=false} = params;
    let labelClassName = labelRight ? 'label-right gl-row-line-height' : 'gl-row-line-height';
    let compWraperCol = 24 - labelCol;
    let labelColCofig = {
        lg: labelCol,
        sm: labelCol,
        xs: labelCol,
        md: labelCol,
        className: labelClassName
    }
    let compWraperColConfig = {
        lg: compWraperCol,
        sm: compWraperCol,
        xs: compWraperCol,
        md: compWraperCol,
        className:'gl-row-line-height'
    }
    return { labelColCofig, compWraperColConfig }
}

//获取col配置
function getCustomColConfig(colNum=6, isAddClassName=true) {
    let colCofig = {
        lg: colNum,
        sm: colNum,
        xs: colNum,
        md: colNum,
    }
    colCofig.className = isAddClassName ? 'gl-row-line-height' : '';
    return colCofig;
}
//表头下面的自定义表单区
function getHeadFormItemConfig(param){
    let{item,labelCol,wrapperCol}=param;
    let formItemConfig={
        labelCol:{
            xs: { span: labelCol },
            sm: { span: labelCol },
            md: { span: labelCol }
        },
        wrapperCol:{
            xs: { span: wrapperCol},
            sm: { span: wrapperCol},
            md: { span: wrapperCol}
        }
    }
    let config={
        label: item && (item.itemName || item.labelName) ||'',
        rules:[
            {
              required: item && (item.isMustItem || item.showMast) ||''
            }
        ]
    }
    return Object.assign(config,formItemConfig);
}
export{
    getFormItemConfig,getHeadFormItemConfig,getModalConfig,formItemConfig,modalConfig, radioStyle, radioStyle_28, radioStyle_30, voucherHeightConfig,
    getColConfig, getCustomRowColConfig, getCustomColConfig,betweenIconRender
}
/*2S7LXljdWdGhrCxZ1MFl4i0/jcYg0CI/M/l35xRmsHHDM270ypZGxQFjXbKKRAXA*/